<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>在线留言</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="applicable-device"content="pc,mobile">
<link href="/static/website/css/bootstrap.css" rel="stylesheet">
<link href="/static/website/css/bxslider.css" rel="stylesheet">
<link href="/static/website/css/style.css" rel="stylesheet">
<script src="/static/website/js/jquery.min.js"></script>
<script src="/static/website/js/bxslider.min.js"></script>
<script src="/static/website/js/common.js"></script>
<script src="/static/website/js/bootstrap.js"></script>
<!--[if lt IE 9]><script src="/static/website/js/html5shiv.min.js"></script>
<script src="/static/website/js/respond.min.js"></script><![endif]-->
<SCRIPT language=javaScript>
    $(document).ready(function(){
        // 获取目标元素
          const target = document.getElementById('container');
          // 滚动到该元素（默认顶部对齐）// 平滑滚动到目标元素并顶部对齐
          target.scrollIntoView({ behavior: 'smooth' });
    })
function CheckJob()
{
  if (document.myform.title.value.length==""){
    alert ("留言标题不能为空！");
    document.myform.title.focus();
    return false;
  }
  if (document.myform.name.value.length==""){
    alert ("姓名不能为空！");
    document.myform.name.focus();
    return false;
  }
  if (document.myform.tel.value.length==""){
    alert ("电话不能为空！");
    document.myform.tel.focus();
    return false;
  }
 }
</SCRIPT>
</head>
<body>
<header>
  {% include "website/header.html"%}</header>
<!-- main -->
<div class="container" id="container">
  <div class="row"><!-- right -->
    <div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
      <div class="list_box">
        <h2 class="left_h1">在线留言</h2>
        <div class="feedback">
          <form id="myform" name="myform" class="form-horizontal" method="post" action="/website/feedback/" onSubmit="return CheckJob()">
            {% csrf_token %}
              <div class="form-group">
              <label for="title"class="col-sm-3 control-label">留言标题：</label>
              <div class="col-sm-6">
                <input type="text" name="title" class="form-control" id="title" placeholder="必填">
              </div>
            </div>
            <div class="form-group">
              <label for="username" class="col-sm-3 control-label">您的姓名：</label>
              <div class="col-sm-6">
                <input type="text" name="name" class="form-control" id="username" placeholder="必填">
              </div>
            </div>
            <div class="form-group">
              <label for="tel" class="col-sm-3 control-label">联系电话：</label>
              <div class="col-sm-6">
                <input type="text" name="tel" class="form-control" id="tel" placeholder="必填">
              </div>
            </div>
            <div class="form-group">
              <label for="inputEmail" class="col-sm-3 control-label">电子邮箱：</label>
              <div class="col-sm-6">
                <input type="email" name="email" class="form-control" id="inputEmail">
              </div>
            </div>
            <div class="form-group">
              <label for="add" class="col-sm-3 control-label">联系地址：</label>
              <div class="col-sm-6">
                <input type="text" name="add" class="form-control" id="add">
              </div>
            </div>
            <div class="form-group">
              <label for="contents" class="col-sm-3 control-label">留言内容：</label>
              <div class="col-sm-6">
                <textarea name="contents" class="form-control" rows="3"></textarea>
              </div>
            </div>
            <!--
			<div class="form-group">
              <label for="code" class="col-xs-12 col-sm-3 control-label">验证码：</label>
              <div class="col-xs-7 col-sm-2">
                <input type="text" name="code" class="form-control" id="code" placeholder="验证码">
              </div>
              <div class="col-xs-2 col-sm-1"><img class="codeimg" src="/T03/common/verify.html" onclick='this.src=this.src+"?"+Math.random()'/></div>
            </div>
              -->

            <div class="form-group">
              <div class="col-sm-offset-3 col-sm-10">
                <button type="submit" name="button" value="Send" class="btn btn-danger page-btn">提交留言</button>
                &nbsp;
                <button type="reset" name="reset" class="btn btn-default grey-btn">重新填写</button>
              </div>
            </div>

          </form>
        </div>
      </div>
    </div>
    <!-- left -->
   {% include "website/left.html"%}
  </div>
</div>
{% include "website/footer.html"%}